home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
KEYBOARD
/
SMARTQUOTES
/
!Quotes
/
Docs
/
Manual
< prev
next >
Wrap
Text File
|
1995-07-25
|
24KB
|
480 lines
Smart Quotes version 1.51
© Sam Kington 25th July 1995
This program is shareware, *not* public domain or freeware. You are allowed
to evaluate this program free of charge for a period of two weeks; after
that, you should destroy it if you do not intend to use it, or pay the
registration fee to carry on using it. The registered version has more
features than the free version, so there’s a carrot *and* a stick ;-). See
the file “Versions” for more details.
It only runs under RISC OS 3 or later, but nowadays this means most people.
Bear in mind that this file uses all the typographically-correct characters
provided by Smart Quotes, and as such will look strange on other platforms or
if you’re viewing it in the System font.
Contents
********
This file contains the following sections (those marked * are essential to
using Smart Quotes, the others less so):
*• Quotation marks – how quotes work
*• Expands – how expands work
*• Typing mistakes – which ones Smart Quotes can correct
*• Menu structure, windows – brief explanation
*• Expand menu – what it does
*• Settings window – where you choose types of substitution
• Choices dialogue box – various preferences or choices
• Other choices – more choices
• Characters dialogue box – change the characters used for quotes
*• Expands window – viewing and editing expands
• Using expands – hints and tips for expands
*• Known problems – please read
• How to use hotkeys with Smart Quotes
*• Thanks, credits and acknowledgements
• Boring legal message – terms of distribution
• How to contact me – says it all really. Address, email, etc.
Quotation marks
***************
Operation of the program is (hopefully) self-explanatory; the principles
behind it may not be. What the program basically does is sit in the
background, and intercept all the key presses, substituting quotes according
to the current settings, correcting miscapitalisation and doing all sorts
of clever things involving expands (see below for a full explanation). It
does this by remembering which keypresses have come before, and guessing what
the text you’re editing looks like. If you’re just typing away, or have moved
about using the left or right cursor only, this will usually be almost 100%
accurate; if you start moving up or down, moving left or right by words or
sentences, or move the cursor with the mouse, it will give up and start from
scratch. If Smart Quotes gives up, its icon will briefly change to a question
mark “?”.
Note that Smart Quotes assumes that Tab inserts a tab character, and that
Copy deletes to the right. If this is not the case in the editor you are
using, Smart Quotes may get confused.
Smart Quotes will often not substitute quotes in a writable icon – keys
are usually handled directly by the WIMP in writable icons, so Smart Quotes
doesn’t get to hear about them. You have to insert them manually –
Shift-Adjust-clicking on any of Smart Quotes’ windows’ close icon will run
!Chars (or whatever character viewer you have chosen – see “Other choices”).
Expands
*******
Expands are similar in operation to Impressions’ abbreviations: you type
in something which is automatically replaced by something else. They are used
for ligatures (fi), accents (é), various other symbols (×) and can also be
used to apply rules of punctuation (only one space after a full stop, commas
must be before quotes and note afterwards, etc.). There are two parts to an
expand, the “found” part and the “substituted” part – so for instance, to get
a ligature such as fi, you would create an expand with “fi” in the found part,
and “fi” in the substituted part. When you type fi, Smart Quotes will
automatically replace it by fi.
See the “Expands” directory for more details.
Related to expands, but not quite the same thing, is Smart Quotes’ ability
to delete ligatures properly. As long as Smart Quotes knows that you’re
deleting a ligature (i.e. you typed it recently), if you delete it Smart
Quotes will pretend it was two characters – so if the cursor is after “fi,”
and you press Delete, it will delete the fi and replace it with a f (the same
thing works with Copy from the other end).
See “Expands window” for more details about how to add expands yourself,
and “Using expands” for some hints and tips.
Typing mistakes
***************
Typing mistakes, known as “typos” for short: most of them are either
wrong capitalisation or transposition of two letters. Short of having a
massive dictionary Smart Quotes can’t help you with transposition – and
anyway if you’re using this in a word processor you will have a spell checker
–, but it can make an intelligent guess at correcting capitalisation.
What usually happens is this: you have Caps Lock turned off, and you want
to type a word beginning with a capital letter, so you press Shift to make
the first letter a capital – and then you leave it on too long so the second
letter ends up capitalised as well. You’ve usually let it go by the time you
type the third letter, so you end up WIth WOrds THat LOok SOmething LIke
THis. If you have typing mistake checking turned on, and you type two capital
letters at the beginning of a word and then a lower-case letter, Smart Quotes
will replace the second capital letter by a lower-case letter, so you end up
With Words That Look Something Like This.
This is the option that is least likely to cause you problems, as it
doesn’t involve any fancy characters that some programs don’t like. Only turn
it off it you will be typing words like NExT a lot of the time, or if case
matters (variable names, SWI names etc.).
Menu structure, windows
***********************
Smart Quotes supports interactive help, so I will only explain things in
this file that wouldn’t fit in the interactive help messages. Interactive help
should by default be turned on; if it isn’t, select “Interactive help” in the
Choices window, available from the menu option “Choices...” in the icon bar
menu.
One thing worth mentioning here is that you can move the icon around by
dragging with Shift and Ctrl held down. If you drag to the icon bar it
inserts the icon where you dragged it; if you drag outside the icon bar, it
will create a floating window which contains the icon. The state and position
of the icon (if in a window) are stored in the choices.
Expand menu
**************
Save saves a file called “Expands” in the directory pointed to by the
variable SmartQuotes$ChoicesDir, which is by default SmartQuotes$Dir but can
be changed to point elsewhere if the Smart Quotes directory is read-only or
restricted access (i.e. on a network) in the “Other choices” window (see
below). The Expands file is a simple Obey file, so double-clicking on it
will load the expands.
Refresh: basically, choose this option if you want to make sure the front
end really knows what characters are going to be substituted. Usually it
does, but if you have modified the expands in the command line, or by
double-clicking on another Expands file, you have to tell it the
expands have changed. It’s also useful if the window seems to be the wrong
size.
Settings window
***************
The settings dialogue box determines how characters will be substituted.
Choices take effect immediately, so playing around with the different
options and typing to see what happens is usually the best way to work out
what they all mean.
Choices dialogue box
********************
This dialogue box affects the working of the front-end, and so doesn’t
affect substitution of quotes: it’s mainly cosmetics. Changes take effect
immediately. See also the “Other choices” window.
“Show quotes’ state in icon”: If this option is selected, Smart Quotes’
icon will show the state of quote substitution – an open double quote “ if
quotes are on, and a neutral quote " if they are not. If quotes and/or
expands are on, it will briefly change to a question mark “?”.
“Interactive help”: If selected, you will get interactive help on all of
Smart Quotes’ windows and icons; if not, you won’t. As mentioned above, this
is supplied with the module More Help, which means it doesn’t eat up any of
Smart Quotes’ memory – it does use some in the Module Area, though.
“‘Quit’ kills module”: If selected, when you quit the front-end, the
‘SmartQuotes’ module will be killed, thus stopping all substitution. If you
want substitution to carry on after you quit the front-end (if you are short
of memory, for instance), turn this option off. Bear in mind, however, that
without the front-end you will need to use the command line (F12 or
Ctrl-F12) to modify the settings; also, when you quit the front-end, you may
have forgotten the module is still running and substituting quotes.
Programmers beware!
Other choices
*************
The “Other choices” window is different from the other windows, in that
changes you make in this window do not take effect immediately. This is due
to the special nature of the Other choices window, which is in fact “owned”
by another application, as it wouldn’t fit in the main Smart Quotes
application – which explains the disc access when you click on the “Other...”
button in the Choices window. Also, when you quit Smart Quotes the “Other
choices” window stays open.
In this window you can change the font styles Smart Quotes uses for the
“Expands” window, the “Edit expands” window and the “Characters”
window; you can change the application to be run when you Shift-Adjust click
on a close icon (the “character viewer”); and you can change where Smart
Quotes stores its Choices files, if you are running Smart Quotes from a
read-only filing system like a network, a CD or a protected hard disc.
Full interactive help is provided, so there shouldn’t be too many
difficulties. The following comments may be useful:
• You don’t have to drag an application to the window to change the
character viewer; you can drag a file as well. (Unfortunately you cannot use a
directory - you can’t have everything). The file will be run using *WimpTask,
which will run the file without telling applications – so if you run a Drawfile
and Draw (or a similar application) is running, a second copy of Draw will be
loaded. Therefore, the best files to use are Obey, Command, the TaskWindow
equivalents, Desktop or similar files.
• You can change the location of the Choices directory (usually called
“SQ Choices” but you can modify the actual filename by editing the writable
field); when you click “Save and use”, if the filename is different the files
will be copied from their old location to their new one. Smart Quotes will
then try and update the “Choices” file in the (NB) *Smart Quotes* directory –
which may be write-protected. In this case, Smart Quotes will try and save it
in the Scrap directory. This also happens if the new choices directory is
write protected. If you don’t have a Scrap directory set up (i.e. you haven’t
“seen” Scrap if you have RISC OS 3.1) the save will fail.
• When you modify one of the options, the title bar will change to “Other
choices *” to show that the choices have been modified.
Characters dialogue box
***********************
Clicking Default will revert to default settings. An individual character
will also revert to default if the field is left blank.
Clicking Save will save the preferred characters to a file called
“<SmartQuotes$ChoicesDir>.Chars” (see above). This is a standard Obey file,
and so is human-readable and editable (unlike the rather obscure Choices file
;) ). Again, like the Expands file, running it from a Filer window will
load the characters (provided Smart Quotes is running, of course).
Clicking Refresh will re-scan the characters, in case you have changed
the definitions via the command line or by double-clicking on another Chars
file.
Expands window
**************
Choosing ”Expands...“ from the main menu will open the Expands
window, containing a list of all the current expands. The list is divided
into two columns, somewhat like this:
Found Subst
-- –
–- —
—- •
fi fi
fl fl
The window uses an outline font (Trinity.Medium for the text,
Homerton.Bold for the heading, by default) so you can see exactly what is
going on.
The Found column contains the string typed in, the Subst column the text
that replaces it.
Using expands
*************
Most expands in the list are fairly straightforward: f and i make fi, -
twice produces an en-dash (–). There is however more than that to expands:
you can combine several expands. For instance, to get a longer em-dash,
type - three times: it will be substituted by an en-dash, and then by an
em-dash, as another expand was defined as – + - = —. For when a expand
is substituted, it simulates a key-press, and can therefore be the first part
of another expand. (Typing - yet again will turn the em-dash into a bullet
•, as yet another expand was defined as — + - = •).
Accents can also be provided: e and / results in é, e and \ in è, etc.
Circumflexes are more difficult (you need a ^, which uses Shift), and umlauts
are downright difficult: " is already used, and using a colon is dangerous as
colons are commonly used after vowels. You could always use £ or |.
Cautionary tale: at one point I was going through the list of ligatures
in the character set, and found “œ”. Having just done æ, I added o + e = œ.
Then I typed “does”. Oops. So beware: don’t add expands just because
there’s a character that *could* be substituted - you might not want to use
it.
Known problems
**************
First of all, you can’t save the settings from the “Other choices” window
if you’re running Smart Quotes from a read-only file system like a CD. Copy it
somewhere else if you want to change the settings.
If you are programming, typing commands at the CLI (F12 or taskwindow),
doing anything at all involving comms, or in general using an application
that doesn’t look too kindly upon top-bit-set characters, turn Smart Quotes’
substitution off (Adjust-click on the icon will do the trick temporarily).
Otherwise, the CLI will fail to recognise your command (“file 'filters' not
found”), any quotes or expands will be tokenised if you’re programming in
BASIC (it’s particularly spectacular in Zap ;) ), and any e-mail or usenet
postings will look particularly gruesome on some people’s machines. This
isn’t a bug, or even a feature, so there’s nothing you can do about it.
As mentioned previously, Smart Quotes will often not substitute characters
when the cursor is in a writable icon – in a dialogue box or off a menu item,
for instance Name disc in the ADFS icon bar menu. This is because the WIMP
handles those key presses itself (unless the “Notify” option is set in the
validation string, e.g. “KARTN”), and Smart Quotes doesn’t get a look in.
This shouldn’t be too much of a problem – usually you don’t want substitution
in those cases anyway. However, any applications that require you to enter
text in a dialogue box (a field name in a database, for instance), will not
allow substitution.
Those using Zap may find certain expands don’t work – namely, those
using a shift-key to produce the second character, like A E Æ (if Caps Lock
is off), < < « etc. This is because, when Smart Quotes sends Zap a delete
character, Shift is still held down, so Zap looks at Shift-Delete and sees
the command “DELETENEXT” rather than “DELETE”, and so fails to delete the
character, so you’re left with something like AÆ, <« etc. To get round this,
you have to change the key mappings:
Edit the key mappings (iconbar menu, Options=>Edit keys)
Find sDELETE in the file
Replace whatever command is opposite it by DELETE
Save the file
Re-load the key mappings as the new one (Options=>Reload keys)
On a similar level, if you hold down the hyphen key, you may find that
dashes in various shapes and sizes start lining up, looking something like
this -----—•–•-—•-–. (This was actually done in Edit as Zap is fast enough
not to have this problem ;) ). This is because Edit (or whoever the culprit
was) wasn’t managing to delete characters fast enough before another one
comes along, so Smart Quotes’ fancy substitution method falls over. The
solution is simple: don’t type as fast!
If you reload the module when Smart Quotes is running, the expands window
may get seriously confused. Use “Refresh” to solve this.
I have been told of problems with certain terminal emulators (think it was
Hearsay), where Smart Quotes causes spurious interrupts or something. I don’t
know any more about this, and knowing comms programs it’s probably not me ;).
But you have been warned.
As mentioned elsewhere, KeyMouse uses Alt-Select to move a window.
Clicking Alt-Select on the iconbar makes it want to move the window –
obviously it can’t, but tries all the same, and someone complains (ADFS
Filer on my machine). This isn’t Smart Quotes’ fault!
If windows appear in strange positions, or fail to appear at all when you
try and open them, you very probably have a corrupt Choices file. Delete it
and re-run the program; the program will complain that it can’t find a Choices
file, and will then create a new one with the default settings:
• All substitutions on
• Show quotes state in icon
• Use interactive help
• Kill module when quit
• Windows positioned to suit a mode 35 screen or similar (768x288)
Impression’s spell checker doesn’t take kindly to fi and fl (certainly not
on my version, Publisher 4.01, ImpressionSpell 1.27). When spell checking, it
ignores fi and fl, so if you spell check the word “finding” it will complain
that it doesn’t know the word “nding” (rather than complain about not knowing
the word “finding” ;)). This is because, if you look at the character set
(double-click on Smart Quotes’ icon or run !Chars), fi and fl are buried among
the odds and ends, like bullets, fractions, dashes, etc., not among the
accents at all (Impression knows about accents - checking the word “étrange”
will come up with “étrange” and not “trange”). I suspect (I haven’t
tried it) Impression will ignore all characters from € to ¿, and cope happily
with À to þ (not ÿ for some reason), so there will be the same problem for Œ
and œ (but not for Æ and æ).
I don’t know what you can do about this, apart from complaining to
Computer Concepts and using the “Ignore” button a lot ;) – the nice man from
Computer Concepts said they had no plans to add support for ligatures to
ImpressionSpell in the near future. (This is from the company whose own
literature, namely the DemoDoc file supplied with Publisher, recommends you
use ligatures all the time ;) ). If it bothers you, remove fi and fl from the
list.
Thanks, acknowledgements, comments
**********************************
I would like to thank Acorn for this nice machine, and especially the bit
in RISC OS 3.1 and later (the Filter Manager) that allows you to intercept
other tasks’ events and muck about with them as you please. It is exceedingly
useful - I have currently nine programs that use filters on my machine (it
used to be seven, but I've been adding them since)...
I got the idea for this utility after reading a small news item in
MacWorld about a similar program for the Mac, that sat in the background and
substituted quotes for you. It also did em dashes, and Smart Quotes didn’t
use to do those, but now it does, and much more...
I am grateful to Michael Rozdoba, author of Desktop+, for making his
source code freely-available so I could see how he coded his code variables -
although I must point out that the vast majority of the code is mine (I
pinched that sentence from him as well ;) ). I don’t think anyone out there
consciously rips off other people’s code (as in copies large chunks of it
verbatim and calls it his own); however, I’m sure every programmer out there
has at one stage or another taken a peek at someone else’s code. And as I’m
not doing this for money or anything, I’ve included the complete source code
to the applications, module and even vector claim routine ;).
Also, thanks to the people who e-mailed me to tell me how wonderful
previous versions were (or not, as the case may be), and to give me ideas
for this version.
The HENSA archive also deserves a thank-you for providing such a good
service to Acorn users over the years (even if it looks likely to die a slow
death in the more or less near future); a big ‘hi’ also goes out to Tom and
Don Clarke. But I’ll stop here before this starts looking like a demo ;).
The disclaimer was “lifted” from Ting Kuei’s DeskPatch help file - this
doesn’t mean anything, I was just looking for a disclaimer and DeskPatch was
the first thing I looked at that had one I liked. The freeware bit I also
stole from someone, but I can’t remember who - sorry!
Other people I should thank for writing very useful bits of software, used
to write this or just making my desktop look prettier:
Dick Alstein, for his wonderful TemplEd.
Dominic Symes for his even more wonderful Zap.
Cy Booker for his BASIC cruncher - worth every penny of the registration fee.
Michael Rozdoba for Desktop+
Mark Greenwood, for Black Hole.
Matthew Godbolt, for FinalLook (quite simply essential on a RO3.1
machine)
Olly Betts for ReducedDrag and SpecialCase - the latter in particular
is a godsend now I have a CD-ROM.
Ian Jeffray for Memory Pie (even if I hate the gratuitous pic ;) ).
Simon Burrows for FontsPlus (font directory thingy).
Computer Concepts for Impression Publisher.
Sorry for anyone I’ve forgotten.
Boring legal message
********************
This registered version of Smart Quotes must not be distributed.
You can, however, use and distribute the module “MoreHelp” separately.
This software is supplied “as is”: I make no warranty, expressed or
implied, of the merchantability of this software or its fitness for any
particular purpose. In no circumstances shall I be liable for any damage,
loss of profits, or any indirect or consequential loss arising out of the use
of this software or inability to use this software, even if I have been
advised of the possibility of such loss.
In other words, if your computer crashes, blows up, you lose all your work
etc. all because of Smart Quotes, don’t blame me.
If you use this at all, please write to me or e-mail me (see below)
telling me how wonderful or how atrocious it is.
How to contact me
*****************
All bug-reports, suggestions, comments or indeed any feedback at all will be
welcomed. Here’s how to get to me:
E-mail : 926286ki@udcf.gla.ac.uk.
This should be OK until June 1996.
I probably won’t be in Glasgow outside term-time, but mail will
be forwarded to wombat@altern.com, which is my French email
address.
Snail-mail : My term-time address, at least until June 1996, is:
Sam Kington
12/1 Southpark Terrace
Glasgow G12 8LG
SCOTLAND
Again, a backup is the home address – anything that goes here will get
to me eventually.
Sam Kington
Merlhiot
24420 Savignac les Eglises
FRANCE
Term-time is October to June, with bits off at Christmas (3 weeks) and
Easter (4 weeks).
I can guarantee support and updates by email; anything else is trickier. If
you send me a disc and the appropriate stamp (or two discs) I'll send you the
latest version of Smart Quotes - registered or unregistered, depending on
which version you have at the moment. (Unless you’ve borrowed this file from a
friend, you should have the registered version).